1. Field of the Invention
The present invention relates to a technique of encoding the attribute data of image data.
2. Description of the Related Art
Image data is sometimes processed using area information (attribute data) associated with the image data. Area information is mainly used for a color process or tone count adjustment in an image output unit to enhance the appearance of an output image. When black is reproduced by mixing yellow, magenta, and cyan in an achromatic color area of a natural image, it can maintain a suitable appearance. When black characters or line images that frequently appear in a document are printed monochromatically using only black, the characters/line images can have sharp edges.
If each pixel has 1-bit attribute data indicating chromatic color/achromatic color or character/non-character, the quality of an output image can be improved at the time of output and, in particular, printing. Information except those described above can also be added as area information.
To compress image information, not only image data but also area information needs to be compressed. Area information is a set of binary data. To compress it, basically, a lossless encoding method must be used. Conventionally, Packbits and JBIG encoding are used to compress area information (e.g., Japanese Patent Laid-Open No. 2003-69835).
However, it is impossible to adjust the code amount of attribute data by compressing it using an encoding method according to the technique in the above reference. Use in a system with a limit memory capacity may cause overflow which poses a serious problem.